package com.industrial.premu.controller.doc;

import com.industrial.common.core.web.controller.BaseController;
import com.industrial.common.core.web.domain.AjaxResult;
import com.industrial.premu.service.IPreMuBenefitEvaluationService;
import com.industrial.premu.service.IPreMuGenChartsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/gen/charts")
public class PreMuGenChartsController extends BaseController {

    @Autowired
    private IPreMuGenChartsService preMuGenChartsService;

    /**
     * 全员劳动生产率
     * @return
     */
    @GetMapping("/rdFund")
    public AjaxResult rdFund(){

        return AjaxResult.success(preMuGenChartsService.getRdFund());
    }

    /**
     * <p>
     *     查询规上工业企业"亩产效益"评价结果分布图
     * </p>
     * @return
     */
    @GetMapping("/queryGsCompanyResult")
    public AjaxResult queryGsCompanyResult(){
        List<Map<String,String>> result = preMuGenChartsService.queryGsCompanyResult();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询备类企业税收及亩均税收情况
     * </p>
     * @return
     */
    @GetMapping("/queryCompanySsAndMjss")
    public AjaxResult queryCompanySsAndMjss(){
        Map<String,Object>  result = preMuGenChartsService.queryCompanySsAndMjss();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询备类企业利润总额及收入利润率
     * </p>
     * @return
     */
    @GetMapping("/queryCompanyLrzeAndSrlrl")
    @ApiOperation("查询备类企业利润总额及收入利润率")
    public AjaxResult queryCompanyLrzeAndSrlrl(){
        Map<String,Object>  result = preMuGenChartsService.queryCompanyLrzeAndSrlrl();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询用地面积前十位的行业(万亩)
     * </p>
     * @return
     */
    @GetMapping("/queryTop10SumAreaIndustry")
    public AjaxResult queryTop10SumAreaIndustry(){
        Map<String, Object> result = preMuGenChartsService.queryTop10Industry();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询税收前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10Taxation")
    public AjaxResult queryTop10Taxation(){
        Map<String, Object> resultMap = preMuGenChartsService.queryTop10Taxation();
        return AjaxResult.success(resultMap);
    }

    /**
     * <p>
     *     查询利润总额前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10Lrze")
    @ApiOperation("查询利润总额前十位的行业")
    public AjaxResult queryTop10Lrze(){
        Map<String, Object> resultMap = preMuGenChartsService.queryTop10Lrze();
        return AjaxResult.success(resultMap);
    }

    /**
     * <p>
     *     查询销售收入前十的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10Sale")
    public AjaxResult queryTop10Sale(){
        Map<String, Object> resultMap = preMuGenChartsService.queryTop10Sale();
        return AjaxResult.success(resultMap);
    }

    /**
     * <p>
     *     查询能耗前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10EnergyConsumption")
    public AjaxResult queryTop10EnergyConsumption(){
        Map<String, Object> result = preMuGenChartsService.queryTop10EnergyConsumption();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询污染物排放前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10Pollution")
    public AjaxResult queryTop10Pollution(){
        Map<String,Object> result = preMuGenChartsService.queryTop10Pollution();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询研发经费投入前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10RdFunding")
    public AjaxResult queryTop10RdFunding(){
        Map<String,Object> result = preMuGenChartsService.queryTop10RdFunding();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询年平均职工人数前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10NumberEmployees")
    public AjaxResult queryTop10NumberEmployees(){
        Map<String,Object> result = preMuGenChartsService.queryTop10NumberEmployees();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询亩均税收前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10PerMuTaxRevenue")
    public AjaxResult queryTop10PerMuTaxRevenue(){
        Map<String,Object> result = preMuGenChartsService.queryTop10PerMuTaxRevenue();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询收入利润率收前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10Srlrl")
    @ApiOperation("查询收入利润率收前十位的行业")
    public AjaxResult queryTop10Srlrl(){
        Map<String,Object> result = preMuGenChartsService.queryTop10Srlrl();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     亩均销售收入前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10AverageSalesPerMu")
    public AjaxResult queryTop10AverageSalesPerMu(){
        Map<String,Object> result = preMuGenChartsService.queryTop10AverageSalesPerMu();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     单位能耗税收前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10UnitEnergyConsumption")
    public AjaxResult queryTop10UnitEnergyConsumption(){
        Map<String,Object> result = preMuGenChartsService.queryTop10UnitEnergyConsumption();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     单位污染物排放销售收入前十位行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10PollutantEmissionIncome")
    public AjaxResult queryTop10PollutantEmissionIncome(){
        Map<String,Object> result = preMuGenChartsService.queryTop10PollutantEmissionIncome();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     研发投入强度前十位的行业
     * </p>
     * @return
     */
    @GetMapping("/queryTop10RdInvestmentIntensity")
    public AjaxResult queryTop10RdInvestmentIntensity(){
        Map<String,Object> result = preMuGenChartsService.queryTop10RdInvestmentIntensity();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     全员劳动生产率
     * </p>
     * @return
     */
    @GetMapping("/queryTop10OverallLaborProductivity")
    public AjaxResult queryTop10OverallLaborProductivity(){
        Map<String,Object> result = preMuGenChartsService.queryTop10OverallLaborProductivity();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     各市规上工业企业用地面积(万亩)
     * </p>
     * @return
     */
    @GetMapping("/queryCityCompanyArea")
    public AjaxResult queryCityCompanyArea(){
        Map<String,Object> result = preMuGenChartsService.queryCityCompanyArea();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     各市规上工业企业税收贡献
     * </p>
     * @return
     */
    @GetMapping("/queryCityCompanySs")
    public AjaxResult queryCityCompanySs(){
        Map<String,Object> result = preMuGenChartsService.queryCityCompanySs();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     各市规上工业企业利润总额贡献
     * </p>
     * @return
     */
    @GetMapping("/queryCityCompanyLrze")
    @ApiOperation("各市规上工业企业利润总额贡献")
    public AjaxResult queryCityCompanyLrze(){
        Map<String,Object> result = preMuGenChartsService.queryCityCompanyLrze();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     各市规上工业企业销售收入
     * </p>
     * @return
     */
    @GetMapping("/queryCityCompanyXssr")
    public AjaxResult queryCityCompanyXssr(){
        Map<String,Object> result = preMuGenChartsService.queryCityCompanyXssr();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     各市规上工业企业总能耗
     * </p>
     * @return
     */
    @GetMapping("/queryCityCompanyZnh")
    public AjaxResult queryCityCompanyZnh(){
        Map<String,Object> result = preMuGenChartsService.queryCityCompanyZnh();
        return AjaxResult.success(result);
    }

    /**
     * 研发经费投入强度
     * @return
     */
    @GetMapping("/funding")
    public AjaxResult funding(){

        return AjaxResult.success(preMuGenChartsService.getFunding());
    }

    /**
     * 单位污染物排放销售收入
     * @return
     */
    @GetMapping("/pollution")
    public AjaxResult pollution(){

        return AjaxResult.success(preMuGenChartsService.getPollution());
    }

    /**
     * 单位能耗税收
     * @return
     */
    @GetMapping("/tax")
    public AjaxResult tax(){

        return AjaxResult.success(preMuGenChartsService.getTax());


    }
    /**
     * 亩均销售收入
     * @return
     */
    @GetMapping("/getAveragePerMu")
    public AjaxResult getAveragePerMu(){

        return AjaxResult.success(preMuGenChartsService.getAveragePerMu());

    }
    /**
     * 亩均税收
     * @return
     */
    @GetMapping("/revenue")
    public AjaxResult revenue(){

        return AjaxResult.success(preMuGenChartsService.getRevenue());

    }

    /**
     * 收入利润率
     * @return
     */
    @GetMapping("/cityTop10Srlrl")
    @ApiOperation("查询收入利润率")
    public AjaxResult cityTop10Srlrl(){

        return AjaxResult.success(preMuGenChartsService.getCityTop10Srlrl());

    }

    /**
     * 年平均职工人数
     */
    @GetMapping("/employees")
    public AjaxResult employees(){

        return AjaxResult.success(preMuGenChartsService.employees());

    }
    /**
     * 研发经费投入
     */
    @GetMapping("/fundingInvestment")
    public AjaxResult fundingInvestment(){

        return AjaxResult.success(preMuGenChartsService.fundingInvestment());

    }
    /**
     * 污染物排放总量
     */
    @GetMapping("/emission")
    public AjaxResult emission(){

        return AjaxResult.success(preMuGenChartsService.emission());

    }

}
